70 GOSUB 785: HOME :AA$ = " NIBBLE DINER ":A1$ = "CAUTIONARY NOTES": VTAB 6: HTAB 3: PRINT "SUGGESTIONS ON WEIGHT AND NUTRITION": VTAB 8: HTAB 3: PRINT "APPLY TO MEN AND WOMEN OF 25 YEARS": VTAB 10: HTAB 3: PRINT "TO 50 YEARS OF AGE."
80 VTAB 13: HTAB 3: PRINT "PREGNANT WOMEN ARE EXCLUDED. THEY": VTAB 15: HTAB 3: PRINT "AND OTHERS ARE ADVISED TO CONTACT": VTAB 17: HTAB 3: PRINT "A DOCTOR FOR ADDITIONAL INFORMATION": VTAB 19: HTAB 3: PRINT "AND ADVICE."
585 QQ$ = "REMEMBER WHERE YOU WERE ? ": VTAB 24: HTAB 5: GOSUB 505:FILE$ = "FOOD": RETURN
590 REM **IDEAL WEIGHT**
595 IF SEX$ = "M" AND (H > = 61 AND H < = 75) THEN 620
600 IF SEX$ = "F" AND (H > = 56 AND H < = 70) THEN 620
605 TEXT : HOME : PRINT "YOU ARE TOO SHORT OR TOO TALL TO FALL": PRINT : PRINT "WITHIN THE RANGE OF VALIDITY OF MY ": PRINT : PRINT "IDEAL WEIGHT CALCULATING ABILITY.": PRINT : PRINT : PRINT "I AM LIMITED TO MEN OF 156 CM(61 IN) TO"
610 PRINT : PRINT "190 CM(75 IN) OR WOMEN OF 142 CM(56 IN)": PRINT : PRINT "TO 178 CM(70 IN) HEIGHT.": VTAB 20:QQ$ = "READY TO RETURN TO THE MENU ": GOSUB 505: IF YES THEN 1550:
910 GOSUB 795: FOR K = 4 TO NF:P(K) = INT(PS(K) *100/NU(K)): NEXT
915 FOR K = 4 TO NF:P$(K) = STR$(P(K)) +" %": NEXT
920 P$(10) = "NOT SPECIFIED":P$(16) = P$(10)
925 TEXT : HOME : GOSUB 820: RETURN
930 REM **NEXT FOOD REQUEST**
935 TEXT : HOME : NORMAL : VTAB 13: HTAB 6: PRINT "PRESS ";: FLASH : PRINT "RETURN";: NORMAL : PRINT " IF FINISHED"
940 VTAB 20: HTAB 11: PRINT G$;G$: VTAB 10: HTAB 6: INPUT "RECORD NUMBER OF NEXT FOOD ? ";A$: VTAB 10: HTAB 38
945 IF LEN(A$) = 0 THEN RETURN
950 RX = INT( VAL(A$)): IF ((RX <1) OR (RX >REC)) THEN VTAB 16: INVERSE : HTAB 5: PRINT "ONLY ";REC;" RECORDS ON THE FOOD FILES": NORMAL : FOR K = 1 TO 2000: NEXT K: GOTO 935
955 GOSUB 865: RETURN
960 REM **ADD NUTRIENTS**
965 PS$(NI) = P$(1):CS$(NI) = A$
970 FOR K = 4 TO NF:P(K) = VAL(P$(K)):PS(K) = PS(K) +CO *P(K): NEXT K: TEXT : HOME : RETURN
975 REM **FILLED SCREEN MESSAGE**
980 TEXT : HOME : VTAB 5: PRINT "I HAVE A SCREEN FULL OF FOOD TO CONTEND": VTAB 7: PRINT "WITH. I CAN COPE WITH ONLY 20 ITEMS.": RETURN
1700 VTAB 10: CALL -958: PRINT "SLOT # = ";SX: PRINT "DRIVE # = ";DX: GOSUB 205: IF Y$ = "N" THEN 1660
1710 IF Y$ < >"Y" THEN 1660
1720 POKE 768,SX: POKE 769,DX
1730 ON Y GOTO 2000,3000,10000,4000,5000,13000,14000,25000
2000 REM **INTRODUCTION ROUTINE**
2010 TEXT : HOME : GOSUB 715
2020 TEXT : HOME : VTAB 04: HTAB 5: PRINT "I WILL ASK YOU SOME QUESTIONS": VTAB 6: HTAB 5: PRINT "TO ESTABLISH YOUR IDEAL WEIGHT"
2030 VTAB 9: HTAB 11: PRINT " YOUR FRAME SIZE ?": VTAB 10: HTAB 8: PRINT "S)MALL M)EDIUM L)ARGE ?": VTAB 10: HTAB 31: GET F$: PRINT F$: IF F$ = "S" OR F$ = "M" OR F$ = "L" THEN GOTO 2050
2040 GOTO 2030
2050 VTAB 12: HTAB 7: PRINT "YOUR SEX ? M)ALE F)EMALE ?": VTAB 12: HTAB 34: GET SEX$: PRINT SEX$: IF SEX$ = "F" OR SEX$ = "M" THEN GOTO 2070
2060 GOTO 2050
2070 VTAB 14: HTAB 5: INVERSE : PRINT "HEIGHT AND WEIGHT MEASURED BY :": VTAB 15: HTAB 8: NORMAL : PRINT "K)ILOGRAMS AND CENTIMETRES": VTAB 16: HTAB 5: PRINT "OR P)OUNDS AND INCHES": VTAB 17: HTAB 7: PRINT "?": VTAB 17: HTAB 8: GET U$
2080 VTAB 17: HTAB 8: PRINT U$: IF U$ = "K" OR U$ = "P" THEN GOTO 2100
2090 GOTO 2070
2100 VTAB 19: HTAB 5: INPUT "YOUR HEIGHT IS ";H: VTAB 19: HTAB 5: CALL -958: PRINT "YOUR HEIGHT IS ";H;" ";: IF U$ = "K" THEN PRINT "CENTIMETRES": GOTO 2120
2110 PRINT "INCHES"
2120 VTAB 23:QQ$ = " IS THE INFORMATION CORRECT ? ": GOSUB 505: IF NOT YES THEN GOTO 2020
2130 IF U$ = "K" THEN H = .0328 *H *12
2140 GOSUB 590: PRINT G$: PRINT G$: FLASH : PRINT " YOUR IDEAL WEIGHT IS ";WL;" TO ";WU;" ";AA$: PRINT : PRINT : PRINT : NORMAL
2150 GOSUB 785
2160 TEXT : HOME : VTAB 2: PRINT "I WILL ASK YOU TO ESTABLISH YOUR ACTIV-": VTAB 3: PRINT "ITY LEVEL FOR MY FUTURE REFERENCE FROM": VTAB 4: PRINT "THE FOLLOWING TABLE."
2180 VTAB 14: PRINT "5. ACTIVE (MANUAL LABOR-SKATING-DANCING)"
2190 VTAB 18: INPUT "CHOOSE A NUMBER FROM 1.0 TO 5.0 ? ";AL: IF (AL <1) OR (AL >5) THEN HOME : FLASH : VTAB 12: HTAB 07: PRINT "ACTIVITY LEVEL OUT OF RANGE": FOR K = 1 TO 2000: NEXT K: NORMAL : GOTO 2160
2200 HOME : GOSUB 680: VTAB 8: PRINT "YOU NEED TO CONSUME ";CL;" TO ";CU: VTAB 10: PRINT "CALORIES TO MAINTAIN YOUR IDEAL WEIGHT": VTAB 12: PRINT "OF ";WL;" TO ";WU;" ";AA$
2210 GOSUB 785
2220 HOME :QQ$ = "SAVE YOUR PERSONAL DATA ON DISK ": VTAB 12: HTAB 2: GOSUB 505: IF YES THEN RX = 0:RL = 30:FILE$ = NAME$ +"S PERSONAL DATA": GOSUB 230: PRINT F$: PRINT SEX$: PRINT U$: PRINT H: PRINT AL: PRINT D$"CLOSE";FILE$: GOTO 2240
2230 GOTO 2250
2240 VTAB 16: PRINT "YOUR FILE NAMED ";FILE$: FOR K = 1 TO 3000: NEXT
2250 HOME :QQ$ = "START A NEW WEIGHT RECORD ": VTAB 12: HTAB 2: GOSUB 505: IF YES THEN RX = 0:RL = 20:FILE$ = NAME$ +"S WEIGHT RECORD": GOSUB 230: PRINT RX: PRINT D$"CLOSE";FILE$: GOTO 2270
2260 GOTO 2280
2270 VTAB 16: PRINT "YOUR FILE NAMED ";FILE$: FOR K = 1 TO 3000: NEXT
2280 HOME :QQ$ = "START A FOOD DATA BASE ": VTAB 12: HTAB 2: GOSUB 505: IF YES THEN 2300
2290 CLEAR : GOTO 1500
2300 HOME : VTAB 8: PRINT "ARE YOU SURE ? THIS IS REQUIRED ONLY": VTAB 10: PRINT "IF YOU DO NOT HAVE FILES CALLED ": VTAB 12: PRINT "'FOOD' ON YOUR DISKS OR WISH TO START": VTAB 14: PRINT "A NEW FOOD DATA BASE.PRESS ANY KEY": VTAB 16
2310 PRINT "TO CHECK YOUR CATALOG AND ESCAPE TO": VTAB 18: PRINT "THE MAIN MENU.": VTAB 22: INPUT "ENTER 'YES' TO ESTABLISH FILES ";Y$
2320 IF Y$ < >"YES" THEN GOSUB 1105: CLEAR : GOTO 1500
5060 M$(1) = "DAILY NUTRITION ANALYSIS":M$(2) = "LONG TERM ANALYSIS":M$(3) = "TO BE ASSIGNED":M$(4) = "TO BE ASSIGNED":M$(5) = "RETURN TO MAIN MENU"
5070 FOR K = 1 TO V1: VTAB (2 *K +3): HTAB 8: PRINT K;". ";M$(K): NEXT K
5080 VTAB 22: HTAB 4: PRINT "ENTER CHOICE (BY NUMBER): ";G$;V1$;" ";V2$;H$;H$;: NORMAL : GET Y$: PRINT Y$:Y = VAL(Y$): IF Y <1 OR Y >V1 THEN 5080
5090 VTAB 2 *Y +3: HTAB 8: INVERSE : PRINT Y;". ";M$(Y): NORMAL : FOR KK = 1 TO 400: NEXT KK
5100 IF Y = V1 THEN CLEAR : GOTO 1500
5110 SX = PEEK(768):DX = PEEK(769)
5120 ON Y GOTO 6000,7000,8000,9000,1500
6000 REM **DAILY NUTRITION ANALYSIS**
6010 TEXT : HOME : GOSUB 305:AA$ = "DAILY CALORIE AND VITAMIN":A1$ = "INTAKE CALCULATION": GOSUB 260: VTAB 10: HTAB 5: PRINT "IS THIS THE BEGINNING OF A NEW": VTAB 12: HTAB 5: PRINT "DAILY RECORD OR A CONTINUATION "
6020 VTAB 14: HTAB 6: PRINT "OF ONE STARTED EARLIER TODAY"
6030 VTAB 18: HTAB 6: PRINT "NEW OR CONTINUING ? (N/C) ?";G$;: GET Y$: PRINT Y$
6080 FOR K = 1 TO NF:PS(K) = 0:P(K) = 0: NEXT K:NI = 0
6090 IF Y$ = "C" THEN GOSUB 560: IF YES = 0 THEN HOME : VTAB 8: PRINT "SORRY! PLEASE START AGAIN FOR TODAY": GOSUB 785: CLEAR : GOTO 1500
6100 GOSUB 930
6110 IF LEN(A$) = 0 THEN 6160
6120 IF ER THEN GOTO 6100
6130 GOSUB 960
6140 IF NI = 20 THEN GOSUB 975: VTAB 15: PRINT "PLEASE FINISH THIS SESSION AND BEGIN": VTAB 17: PRINT "ANOTHER IF YOU HAVE ADDITIONAL ITEMS TO": VTAB 19: PRINT "EVALUATE.": GOSUB 785
6150 IF NI <20 THEN 6100
6160 TEXT : HOME :AA$ = " LIST OF FOODS ":A1$ = "ENTERED THIS SESSION": GOSUB 260: VTAB 23: INVERSE : PRINT "Y)ES-ADDITIONS ALLOWED N)O-NEW START": NORMAL : GOSUB 520
6170 IF YES = 0 THEN TEXT : HOME : VTAB 10: HTAB 11: PRINT "SESSION DISCONTINUED": VTAB 12: HTAB 15: PRINT "BEGIN AGAIN": FOR K = 1 TO 3000: NEXT K: CLEAR : GOTO 1500
6180 QQ$ = "FORGET ANYTHING ? ": TEXT : HOME : VTAB 12: HTAB 09: GOSUB 505: IF YES THEN 6100
6190 QQ$ = "WANT A TOTAL NUTRIENT LISTING ? ": HOME : VTAB 12: HTAB 2: GOSUB 505: IF YES THEN GOSUB 530
6200 QQ$ = "WILL YOU EAT MORE TODAY ? ": VTAB 23: HTAB 5: GOSUB 505: IF YES THEN GOSUB 545: HOME : VTAB 11: PRINT "TOTAL CALORIES CONSUMED STORED ON DISK": FOR K = 1 TO 1500: NEXT
6210 IF YES THEN HOME : VTAB 10: HTAB 8: PRINT "PART DAY REPORT FOLLOWS": FOR K = 1 TO 1500: NEXT
6220 GOSUB 835
6230 IF YES THEN 6250
6240 HOME : VTAB 12: PRINT "NOW I NEED YOUR WEIGHT AND THE DATE.": FOR K = 1 TO 1500: NEXT : GOSUB 725:YES = 0
6250 REM **IDEAL WEIGHT AND NEEDED CALORIES**
6260 GOSUB 680:WI = INT(WT +.5):CI = ( INT(CC)): HOME
6270 IF YES THEN 6430
6280 REM **ACTUAL WEIGHT AND NEEDED CALORIES
6290 WA = INT( VAL(WA$)):
6300 CA = (WA/2.2) *CK: IF U$ = "K" THEN CA = WA *CK
6310 UN$ = "POUNDS": IF U$ = "K" THEN UN$ = "KILOGRAMS"
6320 CW = (CA -PS(4)) *7/3500: IF U$ = "K" THEN CW = CW/2.2
6330 CH$ = "LOSE": IF CW <0 THEN CH$ = "GAIN"
6340 CW = ABS(CW):CW = ( INT(CW *10)/10)
6350 VTAB 2: PRINT "YOU HAVE CONSUMED "; INT(PS(4));" CALORIES": VTAB 5: PRINT "YOU WILL ";CH$;" ABOUT ";CW;" ";UN$;" A WEEK": VTAB 07: PRINT "AT THIS RATE OF EATING"
6360 VTAB 10: PRINT "YOU NEED TO EAT ABOUT ";CI;" CALORIES TO": VTAB 12: PRINT "MAINTAIN YOUR IDEAL WEIGHT OF ";WI: VTAB 14: PRINT UN$;"."
6370 VTAB 17: PRINT "EATING "; INT(CA);" PER DAY WILL MAINTAIN": VTAB 19: PRINT "YOUR ACTUAL WEIGHT OF ";WA;" ";UN$
6490 TEXT : HOME : VTAB 10: PRINT "I SAVED YOUR WEIGHT, THE DATE AND ": VTAB 12: PRINT "THE TOTAL CALORIES YOU CONSUMED TODAY": VTAB 14: PRINT "FOR FUTURE REFERENCE"
6500 VTAB 18: PRINT G$;G$;G$: PRINT "GOODNIGHT " +NAME$;". I'LL SEE YOU TOMORROW": END
7000 REM **LONG TERM ANALYSIS**
7010 TEXT : HOME : VTAB 12: HTAB 8: PRINT "WORKING! DO NOT DISTURB."
7050 FOR K = 1 TO DY:RX = K: GOSUB 285: INPUT PS(4),DA$,WZ(K):C = C +PS(4):W = W +WZ(K): NEXT K: PRINT D$"CLOSE";FILE$
7060 C = C/DY:WX = WZ(1) -WZ(DY):W = W/DY
7070 GOSUB 835: REM **GET PERSONAL DATA**
7080 GOSUB 680: REM **IDEAL WEIGHT & CALORIES**
7090 WI = INT(WT +.5):CI = INT(CC +.5)
7100 UN$ = "POUNDS": IF U$ = "K" THEN UN$ = "KILOGRAMS"
7110 CH$ = "LOSS": IF WL <0 THEN CH$ = "GAIN"
7120 HOME : VTAB 8: PRINT "PLEASE USE THE INFORMATION TO COME TO": VTAB 10: PRINT "ADJUST YOUR CALORIE INTAKE OR": VTAB 12: PRINT "ACTIVITY LEVEL TO ACHIEVE YOUR ": VTAB 14: PRINT "WEIGHT GOAL ";NAME$
7130 GOSUB 785
7140 TEXT : HOME : PRINT "DURING THE ";DY;" DAY PERIOD": VTAB 3: PRINT "ENDING ";DA$;" YOU CONSUMED AN": VTAB 5: PRINT "AVERAGE "; INT(C);" CALORIES PER DAY."
7150 VTAB 8: PRINT "I ESTIMATED THAT YOU NEEDED TO EAT": VTAB 10: PRINT CI;" CALORIES PER DAY TO MAINTAIN ": VTAB 12: PRINT "YOUR IDEAL WEIGHT OF ";WI;" ";UN$;"."
7160 VTAB 15: PRINT "YOUR AVERAGE WEIGHT DURING THE PERIOD": VTAB 17: PRINT "WAS ";W;" ";UN$;".";"YOUR WEIGHT": VTAB 19: PRINT CH$;" DURING THE ";DY;" DAY PERIOD WAS": VTAB 21: PRINT ABS(WX);" ";UN$;"."
7170 GOSUB 785: CLEAR : GOTO 1500
8000 REM **TO BE ASSIGNED**
8010 TEXT : HOME : VTAB 10: PRINT "TO BE ASSIGNED AT PROGRAM LINE 8010": GOSUB 785: GOTO 5040
9000 REM **TO BE ASSIGNED**
9010 TEXT : HOME : VTAB 10: PRINT "TO BE ASSIGNED AT PROGRAM LINE 9010": GOSUB 785: GOTO 5040
10040 AA$ = " DISPLAY DATA ":A1$ = " MENU ": GOSUB 260
10050 M$(1) = "DISPLAY/PRINT FOOD DATA":M$(2) = "SEARCH FOODS BY KEY WORDS":M$(3) = "SORT FOODS-PRINT LIST":M$(4) = "FOOD NUTRITION EVALUATION":M$(5) = "RETURN TO MAIN MENU"
10060 FOR K = 1 TO V1: VTAB (2 *K +3): HTAB 8: PRINT K;". ";M$(K): NEXT K
10070 VTAB 22: HTAB 4: PRINT "ENTER CHOICE (BY NUMBER): ";G$;V1$;" ";V2$;H$;H$;: NORMAL : GET Y$: PRINT Y$:Y = VAL(Y$): IF Y <1 OR Y >V1 THEN 10070
10080 VTAB 2 *Y +3: HTAB 8: INVERSE : PRINT Y;". ";M$(Y): NORMAL : FOR KK = 1 TO 400: NEXT KK
10090 IF Y = V1 THEN CLEAR : GOTO 1500
10100 SX = PEEK(768):DX = PEEK(769)
10110 ON Y GOTO 10500,11000,12000,12500,1500
10500 REM **DISPLAY/PRINT DATA**
10510 A1$ = "DISPLAY/PRINT DATA"
10520 TEXT : HOME : GOSUB 260: HOME :FILE$ = "FOOD": GOSUB 320:RX = 0: GOSUB 275
10530 INPUT REC
10540 PRINT D$"CLOSE";FILE$
10550 HOME : VTAB 6: PRINT "ENTER IN PRINTER INFORMATION.": PRINT : PRINT "DO YOU WANT A PRINTOUT (Y/N) ";G$;: GET Y$: PRINT Y$: IF Y$ = "N" THEN SLOT = 0: GOTO 10640
10560 IF Y$ < >"Y" THEN 10550
10570 VTAB 10: CALL -868: PRINT "ENTER IN SLOT # ";G$;: GET SL$: PRINT SL$:SLOT = VAL(SL$)
10580 IF Y$ = CHR$(27) OR Y$ = CHR$(32) THEN CLEAR : GOTO 1500
10590 IF SLOT <1 OR SLOT >7 THEN PRINT G$;G$: GOTO 10570
10600 PRINT : PRINT "PLEASE TURN ON PRINTER.": PRINT "PRESS ";: INVERSE : PRINT "RETURN";: NORMAL : PRINT " WHEN READY. ";G$;: INPUT Y$
10650 PRINT "VIEW(V) OR PRINT(P) DATA ";G$;: GET VP$: PRINT VP$: IF VP$ = CHR$(13) THEN CLEAR : GOTO 1500
10660 PRINT : CALL -958: PRINT "ENTER RECORD # TO START WITH ";G$;: INPUT START$:RX = VAL(START$)
10670 IF RX >REC THEN PRINT "ONLY ";REC;" RECORDS ON FILE!";G$;G$: GOTO 10660
10680 IF RX <1 THEN RX = 1
10690 GOSUB 275
10700 FOR K = 1 TO NF: INPUT P$(K): NEXT K
10710 IF VP$ = "P" THEN PRINT D$"PR#";SLOT: PRINT : PRINT "RECORD # ";RX
10720 GOSUB 295
10730 PRINT D$"PR#0"
10740 PRINT D$"CLOSE";FILE$
10750 VTAB 22: INVERSE : PRINT "-->";: NORMAL : PRINT " = NEXT ";: INVERSE : PRINT "<--";: NORMAL : PRINT " = LAST"; TAB( 31);"RECORD #"
10760 VTAB 23: PRINT "PRESS ";: INVERSE : PRINT "ESC";: NORMAL : PRINT " FOR RECORD # "; TAB( 30);RX;" OF ";REC
10770 GOSUB 250: PRINT G$;: CALL -868: GET Y$: PRINT Y$: IF Y$ = CHR$(3) THEN END
10780 IF Y$ = CHR$(27) THEN VTAB 24: CALL -868: PRINT "ENTER RECORD NUMBER ";G$;: INPUT RX: GOTO 10670
10790 IF Y$ = CHR$(8) THEN RX = RX -2: GOTO 10830
10800 IF Y$ = CHR$(13) THEN 10640
10810 IF Y$ = CHR$(21) OR Y$ = CHR$(32) THEN 10830
10820 GOTO 10750
10830 RX = RX +1: GOTO 10670
11000 REM **SEARCH FOR FOOD DATA**
11010 A1$ = "SEARCH/DISPLAY FOOD DATA"
11020 TEXT : HOME : GOSUB 260: HOME :FILE$ = "FOOD": GOSUB 320:RX = 0: GOSUB 275
11030 INPUT REC
11040 PRINT D$"CLOSE";FILE$
11050 DIM SRT$(REC +1),SO%(REC)
11060 PRINT D$"OPEN"FILE$",L";RL;",S";SX;",D";DX
11070 FOR K = 1 TO REC:RX = K: GOSUB 285: INPUT SRT$(K):SO%(K) = K: NEXT K
11080 PRINT D$"CLOSE"FILE$
11090 TEXT : HOME : GOSUB 305: VTAB 12: HTAB 4: PRINT "DO YOU WANT A FOOD LIST ? (Y/N) ": VTAB 14: HTAB 4: PRINT "CONTROL LISTING WITH PADDLE 1": VTAB 16: HTAB 20: INPUT Y$: IF Y$ = "N" THEN 11150
11100 IF Y$ < >"Y" AND Y$ < >"N" THEN 11090
11110 TEXT : HOME
11120 FOR J = 1 TO ((REC +2)/2) STEP 2: SPEED= PDL(1): PRINT SRT$(J); TAB( 20);SRT$(J +1): NEXT J
11130 SPEED= 255
11140 PRINT : GOSUB 785: GOTO 11090
11150 REM CONTINUE
11160 TEXT : HOME : VTAB 11: HTAB 10: INPUT "FOOD KEY WORD ? ";Z$:L = LEN(Z$): IF L >20 THEN VTAB 13: HTAB 05: PRINT "LESS THAN 20 CHARACTERS PLEASE": FOR J = 1 TO 1000: NEXT J: GOTO 11160
11170 VTAB 1: HTAB 16: FLASH : PRINT "SEARCHING": POKE 34,3: NORMAL : HOME
11180 FOR J = 1 TO REC
11190 LS = LEN(SRT$(J))
11200 IF LS <L THEN 11240
11210 FOR I = 1 TO (LS -L +1):Y$ = MID$ (SRT$(J),I,L): IF Y$ < >Z$ THEN 11230
11220 PRINT TAB( 6);SO%(J); TAB( 10);SRT$(J)
11230 NEXT I
11240 NEXT J
11250 VTAB 23: HTAB 6: PRINT "ANOTHER SEARCH ? (Y/N) ";: GET Y$: IF Y$ = "Y" THEN 11160
11260 IF Y$ = "N" THEN CLEAR : GOTO 1500
11270 GOTO 11250
12000 TEXT : REM **PRINT USER FOOD LIST**
12010 HOME : INVERSE : VTAB 10: PRINT "LOADING 'SORT AND PRINT FOOD LIST'": NORMAL
12020 PRINT D$;"RUN SORT AND PRINT FOOD LIST,S6,D1"
12520 TEXT : HOME : VTAB 8: PRINT "I WILL ASK YOU FOR THE RECORD NUMBER": VTAB 10: PRINT "OF THE FOOD YOU WANT TO REVIEW AND": VTAB 12: PRINT "THEN TELL YOU THE PERCENTAGE OF YOUR": VTAB 14: PRINT "DAILY REQUIREMENTS MET BY THE SERVING"
12560 HOME : VTAB 20: PRINT G$;G$: VTAB 20: HTAB 9: INPUT "RECORD NUMBER OF FOOD ? ";A$: VTAB 20: HTAB 34
12570 RX = VAL(A$): IF ((RX <1) OR (RX >REC)) THEN HOME : VTAB 16: INVERSE : HTAB 5: PRINT "ONLY ";REC;" RECORDS ON THE FOOD FILES": NORMAL : FOR K = 1 TO 2000: NEXT K: GOTO 12560
12580 GOSUB 865: FOR K = 4 TO NF:P(K) = VAL(P$(K)):PS(K) = P(K) *CO: NEXT K
12630 TEXT : HOME : VTAB 10: HTAB 7:QQ$ = "EVALUATE ANOTHER FOOD ? ": GOSUB 505: IF YES THEN HOME : GOTO 12560
12640 HOME : CLEAR : GOTO 1500
13000 REM **RECIPE EVALUATION**
13010 TEXT : HOME : VTAB 5: PRINT "THIS SECTION OF THE PROGRAM ALLOWS": VTAB 7: PRINT "YOU TO ESTABLISH THE NUTRITIONAL": VTAB 9: PRINT "CONTENT OF YOUR FAVORITE RECIPES.": VTAB 11: PRINT "THE DATA IS THEN STORED ON THE DISK"
13020 VTAB 13: PRINT "AS A SINGLE FOOD ITEM FOR FUTURE USE": VTAB 15: PRINT "IN YOUR NUTRITION ANALYSIS."
13030 VTAB 18: PRINT "THE FOODS USED IN THE RECIPE MUST BE": VTAB 20: PRINT "AVAILABLE IN THE FOOD LIST.": GOSUB 785
13040 HOME : GOSUB 985: VTAB 8: PRINT "I WILL BEGIN BY ASKING YOU TO PROVIDE": VTAB 10: PRINT "ME WITH THE RECORD NUMBERS AND": VTAB 12: PRINT "QUANTITIES OF FOODS IN THE RECIPE.": GOSUB 785
13050 DIM PS(NF),P(NF),PS$(20),CS$(20): FOR K = 1 TO NF:PS(K) = 0:P(K) = 0: NEXT K:NI = 0:WA = 0
13060 GOSUB 930
13070 IF LEN(A$) = 0 THEN 13140
13080 IF ER THEN PRINT : CALL -958: PRINT G$;"ENTER NUMBERS ONLY.": PRINT "PLEASE RE-ENTER FOOD NUMBER.": GOSUB 785:NI = NI -1: GOTO 13060
13085 IF CO = 0 THEN NI = NI -1: GOTO 13060
13090 WA = WA +CO *100
13100 GOSUB 960
13110 IF NI = 20 THEN GOSUB 975: VTAB 10: PRINT "PLEASE STORE THIS MUCH AS A SINGLE": VTAB 12: PRINT "SERVING AND INCLUDE IT AS A DUMMY": VTAB 14: PRINT "ENTRY IN ANOTHER SESSION TO COMPLETE": VTAB 16: PRINT "THIS RECIPE"
13120 IF NI = 20 THEN VTAB 19: PRINT "YOU SHOULD THEN DELETE THIS ENTRY": VTAB 21: PRINT "FROM THE FOOD LIST": GOSUB 785
13130 IF NI <20 THEN 13060
13140 TEXT : HOME :AA$ = " LIST OF FOODS ":A1$ = " IN THIS RECIPE ": GOSUB 260: GOSUB 520: IF YES THEN 13150
13145 HOME : CLEAR : GOTO 1500
13150 TEXT : HOME : VTAB 4: PRINT "I HAVE ESTABLISHED THE TOTAL WEIGHT OF": VTAB 6: PRINT "THE RECIPE AS "; INT(WA);" GM OR "; INT(WA/2.83)/10;" OZ"
13160 VTAB 9: PRINT "PLEASE PROVIDE THE REVISED OR COOKED": VTAB 11: PRINT "TOTAL WEIGHT IF YOU DESIRE GREATER": VTAB 13: PRINT "ACCURACY."
13170 VTAB 23: PRINT "PRESS ";: FLASH : PRINT "RETURN";: NORMAL : PRINT " IF NO CHANGE"
13190 VTAB 20: INPUT "TOTAL WEIGHT (XXGM OR XXOZ) ";A$
13200 IF LEN(A$) = 0 THEN 13270
13210 IF ( RIGHT$(A$,2) = "GM") OR ( RIGHT$(A$,2) = "OZ") THEN 13230
13220 VTAB 20: PRINT "MUST END IN 'GM' OR 'OZ'! ": FOR K = 1 TO 1500: NEXT K: GOTO 13190
13230 LE = LEN(A$): GOSUB 475
13240 A$ = LEFT$(A$,LE -2)
13250 WA = VAL(A$): IF WA = 0 THEN HOME : VTAB 2: PRINT "REVISED WEIGHT MUST BE A NUMBER": GOTO 13160
13260 WA = 100 *CO
13270 HOME : VTAB 2: PRINT "PLEASE ENTER THE RECIPE NAME AS 'FOOD'":K = 1: PRINT : PRINT : GOSUB 215
13280 IF LEN(P$(1)) >TV(1) THEN PRINT "ENTRY TOO LONG";G$;G$: FOR KK = 1 TO 750: NEXT KK: VTAB (CV +1): HTAB 1: CALL -958: GOTO 13270
13290 TEXT : HOME : VTAB 8: PRINT "PLEASE TELL ME THE NUMBER OF STANDARD ": VTAB 10: PRINT "SERVINGS IN THE RECIPE": VTAB 13: HTAB 8: INPUT "SERVINGS ?";KK: IF KK < = 0 THEN 13290
13300 P$(2) = STR$( INT(WA/KK)) +"GM-" + STR$( INT(WA/(KK *2.83))/10) +"OZ-1/" + STR$(KK) +"SUM": IF LEN(P$(2)) >20 THEN HOME : VTAB 10: PRINT "SECOND FIELD TOO LONG": FOR K = 1 TO 3000: NEXT K: GOTO 13290
13310 P$(3) = STR$((WA/(KK *100))): FOR K = 4 TO NF:P$(K) = STR$((100/WA) *PS(K)):P$(K) = LEFT$(P$(K),6): NEXT K
13320 GOSUB 1005:RX = 0: GOSUB 230: PRINT REC: PRINT D$"CLOSE": HOME : VTAB 10: PRINT P$(1);" STORED AS RECORD ";REC: FOR K = 1 TO 2000: NEXT K: CLEAR : GOTO 1500
14000 REM **TO BE ASSIGNED**
14010 TEXT : HOME : VTAB 10: PRINT "TO BE ASSIGNED AT PROGRAM LINE 14010": GOSUB 785: GOTO 1550
25000 REM **END PROGRAM ROUTINE**
25010 FOR K = 1 TO 100: NEXT K: TEXT : HOME : PRINT "DON'T FORGET TO MAKE A BACK-UP": PRINT "OF YOUR DATA.";G$;G$;G$: PRINT : PRINT "HAVE A NICE DAY!"